27/09/2020

Project environments with renv

renv package logo

renv makes your R project:

  • isolated
  • portable
  • reproducible

renv in a nutshell

renv features:

  • renv installs packages from a variety of sources
  • supports authentication
  • shims allows to take advantage of package cache

Simple workflow

  • call renv::init() to initialize tracking
  • renv::snapshot() saves the state of the project library to a lockfile
  • call renv::restore() whenever you would like to revert the changes you have made

drake

drake package logo

drake keypoints:

  • analyzes workflow
  • skips steps with up-to-date results
  • allows distributed computing

Drake plan

plan <- drake_plan(
  # all the functions you want to call
)
vis_drake_graph()
drake plan raw

Drake plan

make(plan)
vis_drake_graph()
drake plan done

Drake plan

drake plan with changes

Summary

renv status drake status

Learning materials

Thank you!

biogenies